package com.xuantian.baoming.service.Impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xuantian.baoming.mapper.WorksInfoMapper;
import com.xuantian.baoming.entity.WorksInfo;
import com.xuantian.baoming.service.WorksInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * (WorksInfo)表服务实现类
 *
 * @author makejava
 * @since 2024-10-10 17:08:58
 */
@Service("worksInfoService")
public class WorksInfoServiceImpl extends ServiceImpl<WorksInfoMapper, WorksInfo> implements WorksInfoService {

    @Autowired
    private WorksInfoMapper worksInfoMapper;
    @Override
    public WorksInfo queryNameAndContact(WorksInfo worksInfo) {

        LambdaUpdateWrapper<WorksInfo> wrapper = new LambdaUpdateWrapper<>();
        wrapper.eq(WorksInfo::getName,worksInfo.getName());
        wrapper.eq(WorksInfo::getContact,worksInfo.getContact());
        WorksInfo worksInfo1 = worksInfoMapper.selectOne(wrapper);
        return worksInfo1;
    }
}

